/**
 * @file Communication.h
 * @author SoBigDog (623644973lubin@163.com)
 * @brief 
 * @version 0.1
 * @date 2020-11-16
 * 
 * @copyright Copyright (c) 2020
 * 
 */
#ifndef _COMMUNICATION_H_
#define _COMMUNICATION_H_

#include "stm32f1xx_hal.h"
#include "ModelDefine.h"

//void (*callbackhandler)(int argc, char * argv);

enum REQ_CMD {
	REQ_UNDEFINE = 0,
	REQ_BRANK,
	REQ_CAN_BAUDRATE,
	REQ_CAN_REGISTER,
	REQ_UART_BAUDRATE
};

enum SET_CMD {
	SET_UNDEFINE = 0,
	SET_BRANK,
	SET_CAN_BAUDRATE,
	SET_CAN_REGISTER,
	SET_UART_BAUDRATE,

	SET_SAVE_CONFIG = 128,
};

struct CommandStruct {
	uint8_t		Cmd;
	uint8_t		Value[];
};

void SendModel(const struct ModelDefine * model);

#endif


